package com.yanqu.road.server.logic.smallgame.stage;

public enum eGridSwitchType
{
    Blank("空格", 0),
    NotLimit("无限制格子", 1),
    Start("起点", 2),
    End("终点", 3),
    LimitLeft("只能向左", 4),
    LimitRight("只能向右", 5),
    LimitUp("只能向上", 6),
    LimitDown("只能向下", 7),
    ;

    private String name;

    private int intValue;

    eGridSwitchType(String name, int value) {
        intValue = value;
        this.name = name;
    }

    public static eGridSwitchType forValue(int value) {
        for (eGridSwitchType type : eGridSwitchType.values()) {
            if (type.intValue == value) {
                return type;
            }
        }
        return null;
    }

    public int getValue() {
        return intValue;
    }

    public String getName() {
        return name;
    }

}
